﻿@{
    Layout = null;
}
<style type="text/css">
    table.hovertable {
        font-family: verdana,arial,sans-serif;
        font-size: 11px;
        color: #333333;
        border-width: 1px;
        border-color: #999999;
        border-collapse: collapse;
    }

        table.hovertable th {
            background-color: #c3dde0;
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }

        table.hovertable tr {
            background-color: #d4e3e5;
        }

        table.hovertable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }
</style>
@using (Html.BeginForm())
{
<div>
    <table class="hovertable">
       
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            @{
               int cnt = 0;
    List<GodSoft.ViewModels.AssignedData> roles = ViewBag.Roles;

    foreach (var role in roles)
    {
                    if (cnt++ % 7 == 0)
                    {
                        @: </tr><tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
                    }

                      @: <td>
            <input type="checkbox"
                   name="selectedRoles"
                   value="@role.ID"
                   @(Html.Raw(role.Assigned ? "checked=\"checked\"" : "")) />
                        @role.ID  @:  @role.Title


                        @:</td>
                            }
                            @: </tr>

}
        
</table>
    <input type="submit" value="Save" style="align-content:center"/>
 </div>
}









